<template>
	<view class="automaticIdentification">
		<u-input v-model="content" placeholder="请输入识别的司机车辆信息" type="textarea" :border="false" :auto-height="true" />
		<view class="btnBox" v-if="content.length">
			<text class="clearText" @click="content = ''">清空</text>
			<view>
				<u-button class="recognition" shape="circle" type="primary" size="small" @click="recognition">
					<text class="recognitionText">识别</text>
				</u-button>
			</view>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import { getStringDataToObject } from '../api/logisitcsCompany';
const content = ref('');
const emits = defineEmits(['ok']);
// 识别
const recognition = () => {
	// 把识别信息返回出去
	getStringDataToObject(content.value).then((res) => {
		// emits('ok', msg);
	});
};
</script>

<style lang="scss">
.automaticIdentification {
	border: 1px solid #ccc;
	padding: 10rpx;
	border-radius: 10rpx;

	.btnBox {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		font-size: 28rpx;
		margin-right: 10rpx;

		.clearText {
			margin-right: 20rpx;
		}

		.recognition {
			// width: 120rpx;
			height: 50rpx;

			.recognitionText {
				font-size: 26rpx;
			}
		}
	}
}
</style>
